home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
progs
/
editor
/
frexxed
/
fpl
/
simplehelp.fpl
< prev
next >
Wrap
Text File
|
1996-02-17
|
2KB
|
54 lines
export void SimpleHelp(string doc)
{
string docfile="Guide:AllNodes";
int oldbuffer=GetEntryID();
int buffer;
string line, file;
int start=6, stop;
int found=0;
if (strlen(doc)) {
buffer=New();
if (buffer) {
found=1;
Visible(0);
CurrentBuffer(buffer);
Clean(joinstr("Load(\"", docfile, "\");"));
GotoLine(1, 0);
if (Search(joinstr("\"", doc, "\""), "fc+ow-")<0) {
if (Search(joinstr(" ", doc, " "), "fc+ow-")<0) {
if (Search(doc, "fco+w-")<0) {
found=0;
}
}
}
if (found) {
found=0;
line=GetLine();
if (line[start]=='\"')
stop=strstr(line, "\"", ++start);
else {
stop=strstr(line, " ", start);
if (stop==-1)
stop=strstr(line, "\n", start);
}
if (stop) {
line=substr(line, start, stop-start);
if (Search(":\n", "fow-")>=0) {
file=substr(GetLine(), 0, ReadInfo("byte_position"));
System(sprintf("run >nil: <nil: Amigaguide \"%s\" Document \"%s\" PubScreen \"%s\"", file, line, ReadInfo("current_screen", oldbuffer)));
ReturnStatus(sprintf("AMIGAGUIDE \"%s\" DOCUMENT \"%s\" PUBSCREEN \"%s\"", file, line, ReadInfo("current_screen", oldbuffer)));
found=1;
}
}
}
CurrentBuffer(oldbuffer);
Kill(buffer);
}
}
if (!found)
System(sprintf("run >nil: <nil: Amigaguide FrexxEd:Docs/FrexxEd.guide PubScreen \"%s\"", ReadInfo("current_screen")));
}
AssignKey("SimpleHelp(PromptString(\"\", \"Help on word\"));", "Amiga Shift 'Help'");
AssignKey("SimpleHelp(GetWord());", "'Help'");